-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: use SET method to update original transaction in the Onyx store #78433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use SET method to update original transaction in the Onyx store #78433
Conversation
The MERGE method batch the onyx updates and feels slow when updating original transaction while splitting
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.mp4Android: mWeb Chromeandroid.mweb.mp4iOS: HybridAppios.mp4iOS: mWeb Safariios.mweb.mp4MacOS: Chrome / Safariweb.mp4 |
|
Hi, @amyevans |
trjExpensify
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a product standpoint, avoiding the "third" expense preview makes sense. That said, cc'ing @lakchote for vis here for the approach to the fix.
amyevans
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience as I've been OOO!
One small suggestion for the code comment from my side, although will wait to see if @lakchote has any feedback as well
Co-authored-by: Amy Evans <amy@expensify.com>
lakchote
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for waiting for my opinion @trjExpensify @amyevans!
Changes look good to me (to use SET), since we're already spreading the complete original transaction object
|
Perfect, thanks for confirming! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Explanation of Change
The MERGE method was used to update the
originalTransaction, which batches the onyx updates and feels slow when updating the original transaction while splitting the transaction. Hence, the original transaction preview is shown briefly along with two splitted transactions.So, I updated the code to use the SET method to update
originalTransactionfor faster updates.Fixed Issues
$ #76754
PROPOSAL: #76754 (comment)
Tests
Offline tests
QA Steps
Same as tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-12-21.at.3.33.45.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-12-25.at.12.40.21.AM.mov
iOS: Native
Screen.Recording.2025-12-25.at.12.29.55.AM.mov
iOS: mWeb Safari
Screen.Recording.2025-12-25.at.12.36.28.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-12-25.at.12.42.21.AM.mov